<template>
  <span>
    <van-icon @click.stop="good" name="good-job-o" />
  </span>
</template>

<script>
import { goodArticle } from '@/api/InterviewSkills';
export default {
  data () {
    return {
      goodList: []
    }
  },
  props: {
    id: {
      required: true
    }
  },
  methods: {
    async good () {
      this.goodList = []
      const res = await goodArticle({
        article: this.id,
        needToken: true
      })
      // console.log(res.data);
      this.goodList = res.data.list
      localStorage.setItem('goodList', JSON.stringify(this.goodList))
      this.$toast.success('操作成功')
    },
    created () {
    }
  }
}
</script>

<style>
</style>
